import request from '@/utils/request'

const apl_decision_record_Api = {
  saveRecord: '/apl_decision_record/save', 
  getNoDecisionRecords: '/apl_decision_record/getNoDecisionRecords', // 主办人查询未保存的干预记录
  getNoDecisionMainRecords: '/apl_decision_record/getNoDecisionMainRecords', // 主办人查询已保存的干预记录
  getNoDecisionSubRecords: '/apl_decision_record/getNoDecisionSubRecords', // 协办人查询未保存的干预记录
  getCaseMainInfo: '/apl_decision_record/getCaseMainInfo' // 获取案件的基本信息
}

/**
 * 保存对应的干预记录表数据
 * @return
 */
export function saveRecord (body) {
  return request({
    url: apl_decision_record_Api.saveRecord,
    method: 'post',
    data: body
  })
}

/**
 * 主办人查询还未决定的干预记录表数据
 * @param {*} faapplyid
 * @returns
 */
export function getNoDecisionRecords (faapplyid) {
  return request({
    url: apl_decision_record_Api.getNoDecisionRecords,
    method: 'post',
    params: {
      faapplyid: faapplyid
    }
  })
}


/**
 * 主办人查询决定的干预记录表数据
 * @param {*} faapplyid
 * @param {*} applyid
 * @returns
 */
export function getNoDecisionMainRecords (faapplyid, applyid) {
  return request({
    url: apl_decision_record_Api.getNoDecisionMainRecords,
    method: 'post',
    params: {
      faapplyid: faapplyid,
      applyid: applyid
    }
  })
}

/**
 * 协办人查询还未决定的干预记录表数据
 * @param {*} faapplyid
 * @param {*} applyid
 * @returns
 */
export function getNoDecisionSubRecords (faapplyid, applyid) {
  return request({
    url: apl_decision_record_Api.getNoDecisionSubRecords,
    method: 'post',
    params: {
      faapplyid: faapplyid,
      applyid: applyid
    }
  })
}

/**
 * 查询案件的基本信息
 * @param {*} faapplyid 案件的applyid
 * @returns
 */
export function getCaseMainInfo (faapplyid) {
  return request({
    url: apl_decision_record_Api.getCaseMainInfo,
    method: 'post',
    params: {
      faapplyid: faapplyid
    }
  })
}
